import { Field, InputType, PartialType } from '@nestjs/graphql';
import { Card } from '../models/card.entity';

@InputType('cardInput')
export class CardInput extends Card {
  @Field({
    description: '名字',
  })
  name: string;

  @Field({
    description: '卡类型',
  })
  type: string;

  @Field({
    description: '上课次数',
    nullable: true,
  })
  time: number;

  @Field({
    description: '有效期（天）',
  })
  validityDay: number;

  @Field({
    description: '所属课程',
    nullable: true,
  })
  courseId: string;

  @Field({
    description: '所属机构',
    nullable: true,
  })
  orgId: string;
}

@InputType()
export class PartialCardInput extends PartialType(CardInput) {}
